layui.config({
    base: '../../static/layuiadmin/' //静态资源所在路径
}).extend({
    index: 'lib/index' //主入口模块
}).use(['jquery','layer','table', 'form'], function() {
    var table = layui.table;
    var $ = layui.jquery;
    var form = layui.form;
    var layer = layui.layer; //独立版的layer无需执行这一句


    $.ajax({
        url:"/server/info",
        type:"get",
        success:function (result) {
            if(result.code==0){
                var jvm=result.data;
                console.log(jvm)
                $("#runTime").val(jvm.runTime);
                $("#startTime").val(jvm.startTime);
                $("#version").val(jvm.javaInfo.version);
                $("#vendor").val(jvm.javaInfo.vendor);
                $("#osInfoName").val(jvm.osInfo.name);
                $("#osInfoArch").val(jvm.osInfo.arch);
                $("#hostInfoAddress").val(jvm.hostInfo.address);
                $("#hostInfoName").val(jvm.hostInfo.name);
                $("#javaRuntimeInfoName").val(jvm.javaRuntimeInfo.name);
                $("#javaRuntimeInfoHomeDir").val(jvm.javaRuntimeInfo.homeDir);
                $("#javaRuntimeInfoClassVersion").val(jvm.javaRuntimeInfo.classVersion);
                $("#userInfoCurrentDir").val(jvm.userInfo.currentDir);
                $("#maxMemory").val(jvm.maxMemory);
                $("#totalMemory").val(jvm.totalMemory);
                $("#freeMemory").val(jvm.freeMemory);
                $("#usableMemory").val(jvm.usableMemory);
            }else {
                layer.msg(result.message);
            }
            form.render();
        }
    });




});



